<div class="wrap">
    <h2>Wordpress Simple Survey - Setup</h2>

    <h2>Simple Survey Options:</h2>

    <table class="widefat">
        <thead>
            <tr>
                <th>Syrvey ID</th>
                <th>Operations</th>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <th>Syrvey ID</th>
                <th>Operations</th>
            </tr>
        </tfoot>
        <tbody>
		<?php
		global $wpdb;
		global $wpss_surveys_table;

		$res = $wpdb->get_row("SELECT * FROM $wpss_surveys_table", ARRAY_A);
		if ($res != NULL)
		{
			$rows = $wpdb->num_rows;
			for ($i = 0; $i < $rows; $i++)
			{
				$res = $wpdb->get_row("SELECT * FROM $wpss_surveys_table", ARRAY_A, $i);
				?>
				<tr>
					<td><?php echo $res['surveyID']; ?></td>
					<td><a href="<?php echo $wpss_admin_url;?>&id=<?php echo $res['surveyID']; ?>&action=delete">Delete</a> |
						<a href="<?php echo $wpss_admin_url;?>&id=<?php echo $res['surveyID']; ?>&action=edit">Edit</a> </td>
				</tr>
				<?php
			}
		}
		?>
        </tbody>
    </table>

    <form name="wpss_form1" method="post" action="<?php echo $wpss_admin_url; ?>">
        <input type="hidden" name="wpss_hidden" value="SurveysListForm">

        <div id="icon-tools" class="icon32"></div>

        <div class="wpss_optionss">
            <p><strong>Quiz ID: </strong><input type="text" name="wpss_QuizID" size="20" maxlength="20" />
                <input class="button" type="submit" name="createNewBtn" value="<?php _e('Create New Quiz', 'wpss_trdom') ?>" /></p>

        </div>
    </form>
</div>

